﻿using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;

namespace Cordyceps.Micro.AuthServer.SqlServer.DbMigrator;

public class DbMigratorHostedService : IHostedService
{
    private readonly IConfiguration _configuration;
    private readonly IHostApplicationLifetime _hostApplicationLifetime;

    /// <summary>
    /// </summary>
    /// <param name="hostApplicationLifetime"></param>
    /// <param name="configuration"></param>
    public DbMigratorHostedService(
        IHostApplicationLifetime hostApplicationLifetime,
        IConfiguration configuration)
    {
        _hostApplicationLifetime = hostApplicationLifetime;
        _configuration = configuration;
    }

    public Task StartAsync(CancellationToken cancellationToken)
    {
        return Task.CompletedTask;
    }

    public Task StopAsync(CancellationToken cancellationToken)
    {
        return Task.CompletedTask;
    }
}